package com.xltt.vehicleControl.contract;


import com.xltt.vehicleControl.base.BaseView;
import com.xltt.vehicleControl.bean.BaseData;
import com.xltt.vehicleControl.bean.BaseResult;
import com.xltt.vehicleControl.bean.DiagnosticsResponse;
import com.xltt.vehicleControl.bean.PushConfig;
import com.xltt.vehicleControl.bean.RemoteControlRequest;
import com.xltt.vehicleControl.bean.RemoteControlResponse;
import com.xltt.vehicleControl.bean.TcVehicleProfileResponse;
import com.xltt.vehicleControl.bean.TscVehicleCapabilityResponse;
import com.xltt.vehicleControl.bean.UpdateSession;
import com.xltt.vehicleControl.bean.VehicleStatusResponse;

import io.reactivex.Observable;
import retrofit2.http.GET;
import retrofit2.http.PUT;
import retrofit2.http.Path;
import retrofit2.http.Query;

/**
 * 车控的接口管理器
 * created by zhanghui
 * on 2020/2/2 15:33
 */
public interface IVehicleControlContract {
    interface IVehicleControlModel {
        /**
         * 获取绑定车辆
         * @param userId
         * @param type
         * @return
         */
        Observable<BaseResult<TcVehicleProfileResponse>> getVehicleList(String userId, String type);

        /**
         * 远程控制车辆
         * @param var1
         * @param var2
         * @return
         */
        Observable<BaseResult<RemoteControlResponse>> remoteControl(String var1, RemoteControlRequest var2);

        /**
         * 获取车辆运行状态
         * @param var1
         * @param var2
         * @param var3
         * @param var4
         * @return
         */
        Observable<BaseResult<VehicleStatusResponse>> getVehicleStatus(String var1,String var2,String var3, String var4);

        /**
         * 获取车辆能力集
         */
        Observable<BaseResult<TscVehicleCapabilityResponse>> getVehicleCapability(String vin,
                                                                                  int pageSize, int pageIndex,
                                                                                  int vehicleType, String sortField,
                                                                                  String direction);

        /**
         * 登出
         * @return
         */
        Observable<BaseResult<BaseData>> logout();

        /**
         * 获取阿里推送配置信息
         * @param deviceId
         * @param appId
         * @param gapp
         * @param appType
         * @param aliPushId
         * @param deviceClass
         * @param modelCode
         * @param pushType
         * @return
         */
        Observable<PushConfig> deviceConfig(String deviceId,
                                            String appId,
                                            String gapp,
                                            String appType,
                                            String aliPushId,
                                            String deviceClass,
                                            String modelCode,
                                            String pushType);
        /**
         * 初始化车辆警告与账号异地登录状态
         */
        Observable<BaseResult<BaseData>> update(String vin, UpdateSession updateSession);
    }

    interface IVehicleControlPresenter {
        void getVehicleList(String userId, String type);
        void remoteControl(String var1,RemoteControlRequest var2);
        void getVehicleStatus(String var1,String var2,String var3, String var4);
        void getVehicleCapability(String vin,
                                  int pageSize, int pageIndex,
                                  int vehicleType, String sortField,
                                  String direction);
        void logout();
        void deviceConfig(String deviceId,String appId,
                                            String gapp,
                                            String appType,
                                            String aliPushId,
                                            String deviceClass,
                                            String modelCode,
                                            String pushType);
        void update(String vin,UpdateSession updateSession);
    }

    interface IVehicleControlView extends BaseView {
        /**
         * 获取绑定车辆结果
         */
        void getVehicleListResult(BaseResult<TcVehicleProfileResponse> data);
        /**
         * 远程控制车辆结果
         */
        void remoteControlResult(BaseResult<RemoteControlResponse> data);
        /**
         * 获取车辆运行状态结果
         */
        void getVehicleStatusResult(BaseResult<VehicleStatusResponse> data);
        /**
         * 获取车辆能力集结果
         */
        void getVehicleCapabilityResult(BaseResult<TscVehicleCapabilityResponse> data);
        /**
         * 登出结果
         * @return
         */
        void logoutResult(BaseResult<BaseData> user);

        /**
         * 获取推送配置结果
         * @param pushConfig
         */
        void deviceConfigResult(PushConfig pushConfig);
        /**
         * 初始化车辆警告与账号异地登录状态
         */
        void updateResult(BaseResult<BaseData> data);
    }
}
